<!DOCTYPE html>
<html>
    <head>
        <title>
            <%= title %>
        </title>
        <link href="/stylesheets/style.css" rel="stylesheet"/>
        <script type="text/javascript" src="/javascripts/jquery.min.js"></script>
    </head>
    <body>
        <h1>
            <%= title %>
        </h1>
        <p>
            Welcome to <%= title %>
        </p>
        <input id="text" type="text" placeholder="输入消息内容"/>
        
        <br>
        <a href="#" id="send">
            发送一条消息
        </a>
        <script type="text/javascript">
            $(function(){
	    		$('#send').on('click',function(){
	    			$.post('/api/pushmsg',{text:$('#text').text()},function(){
	    				alert('发送成功')
	    			});
	    		});
	    	});
        </script>
    </body>
</html>
